Skip to content

fix: banner for usage alert - #191

Merged
yashdev9274 merged 1 commit into
mainfrom
supercode-cli
Jul 9, 2026
Merged

fix: banner for usage alert#191
yashdev9274 merged 1 commit into
mainfrom
supercode-cli

Conversation

@yashdev9274

@yashdev9274 yashdev9274 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Description

Please include a summary of the change and which issue is fixed.

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • bun test passes
  • bun run typecheck passes
  • bun run lint passes (if applicable)

Checklist:

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Summary by CodeRabbit

  • New Features
    • Added a prominent top-of-page notification banner on the homepage.
    • The banner informs visitors about a temporary service interruption and points them to an alternative option in the meantime.

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
supercli Ready Ready Preview, Comment Jul 9, 2026 6:46am
supercli-client Ready Ready Preview, Comment Jul 9, 2026 6:46am
supercli-docs Ready Ready Preview, Comment Jul 9, 2026 6:46am

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The Navbar component's JSX return is wrapped in a React fragment, adding a new fixed amber notification banner that displays a message about a user-growth spike and Opus being temporarily down, with guidance to use frontier open models via Concentrate AI.

Changes

Navbar Banner Addition

Layer / File(s) Summary
Fragment wrap and amber banner insertion
apps/web/components/homepage/navbar.tsx
Navbar's return is wrapped in a fragment, and a fixed amber banner is added announcing Opus downtime with a suggestion to use frontier open models through Concentrate AI.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A banner blooms in amber light,
"Opus rests, but we're alright!"
Hop along to open models bright,
Concentrate AI through the night. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the new usage-alert banner added to the navbar.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch supercode-cli

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/components/homepage/navbar.tsx`:
- Around line 317-327: The homepage notification banner in navbar.tsx needs an
accessibility role so screen readers announce it; update the banner container in
the navbar component to include role="status" (or role="alert" if you want a
more urgent announcement) on the fixed top banner wrapper so assistive tech
picks up the time-sensitive message.
- Around line 317-327: The amber announcement banner in navbar.tsx is hardcoded
to a fixed top offset, so it stays misaligned when BetaCountdownBanner is hidden
and leaves a gap. Update the banner container in the navbar component to derive
its top position from bannerVisible, matching the existing mobile menu overlay
behavior, and use cn() from `@/lib/utils` to conditionally apply the correct top
classes. Keep the banner aligned directly below the header in both states.
- Around line 317-327: The temporary outage banner in the navbar needs a dismiss
control so it doesn’t stay visible forever. Update the banner markup in
navbar.tsx to add a close button and use local state in the navbar component to
hide the banner after dismissal; if the banner is meant to be controlled
centrally, wire it to a server-driven flag instead. Make sure the change is
scoped around the existing fixed banner block and its rendering condition so the
notification can be removed cleanly by the user.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2145b91d-865c-4b78-979e-9b5ff7d25a36

📥 Commits

Reviewing files that changed from the base of the PR and between 5fc6ac3 and 6d451c6.

📒 Files selected for processing (1)
  • apps/web/components/homepage/navbar.tsx

Comment on lines +317 to +327
<div className="fixed top-[114px] left-0 right-0 z-50 flex items-center justify-center px-4">
<div className="flex items-center gap-2 px-4 py-2.5 rounded-full bg-amber-500/10 border border-amber-500/20 text-amber-400 text-[13px] font-mono animate-in fade-in slide-in-from-top-2 duration-500">
<span className="w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse shrink-0" />
<span>
Unexpected spike in user growth &amp; Opus usage — Opus is temporarily down.
We&apos;re working on it. Use{" "}
<span className="text-amber-300 font-semibold">frontier open models</span> through Concentrate AI in the
meantime.
</span>
</div>
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add role="status" to the banner for screen reader accessibility.

The banner is a time-sensitive notification that should be announced to assistive technology users. Adding role="status" (or role="alert" for more urgent announcements) ensures screen readers pick it up.

♿ Proposed accessibility fix
-    <div className="fixed top-[114px] left-0 right-0 z-50 flex items-center justify-center px-4">
+    <div role="status" className="fixed top-[114px] left-0 right-0 z-50 flex items-center justify-center px-4">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="fixed top-[114px] left-0 right-0 z-50 flex items-center justify-center px-4">
<div className="flex items-center gap-2 px-4 py-2.5 rounded-full bg-amber-500/10 border border-amber-500/20 text-amber-400 text-[13px] font-mono animate-in fade-in slide-in-from-top-2 duration-500">
<span className="w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse shrink-0" />
<span>
Unexpected spike in user growth &amp; Opus usage Opus is temporarily down.
We&apos;re working on it. Use{" "}
<span className="text-amber-300 font-semibold">frontier open models</span> through Concentrate AI in the
meantime.
</span>
</div>
</div>
<div role="status" className="fixed top-[114px] left-0 right-0 z-50 flex items-center justify-center px-4">
<div className="flex items-center gap-2 px-4 py-2.5 rounded-full bg-amber-500/10 border border-amber-500/20 text-amber-400 text-[13px] font-mono animate-in fade-in slide-in-from-top-2 duration-500">
<span className="w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse shrink-0" />
<span>
Unexpected spike in user growth &amp; Opus usage Opus is temporarily down.
We&apos;re working on it. Use{" "}
<span className="text-amber-300 font-semibold">frontier open models</span> through Concentrate AI in the
meantime.
</span>
</div>
</div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/components/homepage/navbar.tsx` around lines 317 - 327, The homepage
notification banner in navbar.tsx needs an accessibility role so screen readers
announce it; update the banner container in the navbar component to include
role="status" (or role="alert" if you want a more urgent announcement) on the
fixed top banner wrapper so assistive tech picks up the time-sensitive message.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Banner position doesn't adapt to bannerVisible state — causes a 44px gap when the countdown banner is hidden.

The amber banner is hardcoded to top-[114px], but the existing mobile menu overlay (line 255) already adjusts between top-[114px] sm:top-[110px] (when bannerVisible is true) and top-[70px] (when false). When BetaCountdownBanner is not visible, the header is only 70px tall, leaving a visible gap between the header and the amber banner.

Use bannerVisible to dynamically set the banner's top offset, and use cn() from @/lib/utils for the conditional classes as per coding guidelines.

🐛 Proposed fix for dynamic banner positioning
-    <div className="fixed top-[114px] left-0 right-0 z-50 flex items-center justify-center px-4">
+    <div className={cn(
+      "fixed left-0 right-0 z-50 flex items-center justify-center px-4 transition-all duration-300",
+      bannerVisible ? "top-[114px] sm:top-[110px]" : "top-[70px]"
+    )}>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="fixed top-[114px] left-0 right-0 z-50 flex items-center justify-center px-4">
<div className="flex items-center gap-2 px-4 py-2.5 rounded-full bg-amber-500/10 border border-amber-500/20 text-amber-400 text-[13px] font-mono animate-in fade-in slide-in-from-top-2 duration-500">
<span className="w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse shrink-0" />
<span>
Unexpected spike in user growth &amp; Opus usage Opus is temporarily down.
We&apos;re working on it. Use{" "}
<span className="text-amber-300 font-semibold">frontier open models</span> through Concentrate AI in the
meantime.
</span>
</div>
</div>
<div className={cn(
"fixed left-0 right-0 z-50 flex items-center justify-center px-4 transition-all duration-300",
bannerVisible ? "top-[114px] sm:top-[110px]" : "top-[70px]"
)}>
<div className="flex items-center gap-2 px-4 py-2.5 rounded-full bg-amber-500/10 border border-amber-500/20 text-amber-400 text-[13px] font-mono animate-in fade-in slide-in-from-top-2 duration-500">
<span className="w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse shrink-0" />
<span>
Unexpected spike in user growth &amp; Opus usage Opus is temporarily down.
We&apos;re working on it. Use{" "}
<span className="text-amber-300 font-semibold">frontier open models</span> through Concentrate AI in the
meantime.
</span>
</div>
</div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/components/homepage/navbar.tsx` around lines 317 - 327, The amber
announcement banner in navbar.tsx is hardcoded to a fixed top offset, so it
stays misaligned when BetaCountdownBanner is hidden and leaves a gap. Update the
banner container in the navbar component to derive its top position from
bannerVisible, matching the existing mobile menu overlay behavior, and use cn()
from `@/lib/utils` to conditionally apply the correct top classes. Keep the banner
aligned directly below the header in both states.

Source: Coding guidelines


🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add a dismiss mechanism for the temporary outage banner.

The banner is a temporary notification about Opus being down, but there's no way for users to dismiss it. This forces the banner to persist on screen indefinitely, degrading the user experience. Consider adding a close button with local state (or a server-driven flag) to allow dismissal.

♻️ Suggested dismiss button implementation
+    const [alertDismissed, setAlertDismissed] = useState(false)
+
     return (
     <>
     <header className="fixed top-0 left-0 right-0 z-[100]">
       ...
     </header>
 
-    <div className="fixed top-[114px] left-0 right-0 z-50 flex items-center justify-center px-4">
+    {!alertDismissed && (
+    <div className="fixed top-[114px] left-0 right-0 z-50 flex items-center justify-center px-4">
       <div className="flex items-center gap-2 px-4 py-2.5 rounded-full bg-amber-500/10 border border-amber-500/20 text-amber-400 text-[13px] font-mono animate-in fade-in slide-in-from-top-2 duration-500">
         <span className="w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse shrink-0" />
         <span>
           Unexpected spike in user growth &amp; Opus usage — Opus is temporarily down.
           We&apos;re working on it. Use{" "}
           <span className="text-amber-300 font-semibold">frontier open models</span> through Concentrate AI in the
           meantime.
         </span>
+        <button
+          onClick={() => setAlertDismissed(true)}
+          className="text-amber-400/60 hover:text-amber-400 transition-colors ml-1"
+          aria-label="Dismiss alert"
+        >
+
+        </button>
       </div>
     </div>
+    )}
     </>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/components/homepage/navbar.tsx` around lines 317 - 327, The
temporary outage banner in the navbar needs a dismiss control so it doesn’t stay
visible forever. Update the banner markup in navbar.tsx to add a close button
and use local state in the navbar component to hide the banner after dismissal;
if the banner is meant to be controlled centrally, wire it to a server-driven
flag instead. Make sure the change is scoped around the existing fixed banner
block and its rendering condition so the notification can be removed cleanly by
the user.

@yashdev9274
yashdev9274 merged commit 31f74d8 into main Jul 9, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant